package lib.config
{
	public class ApplicationConfig
	{
		public static const APP_URL:String = "http://rsica.local/";
		
		public static function createUrl(module:String, action:String = "", parameters:Array = null, queryString:String = ""):String
		{
			var url:String = APP_URL + "index.php/" + module;
			if (action.length > 0)
			{
				url = url + "/" + action;
				if (parameters && parameters.length > 0)
				{
					for each(var param:String in parameters)
					{
						url = url + "/" + param;
					}
				} 
			}
			if (queryString.length > 0)
			{
				url = url + "?" + queryString;
			}
			return url;
		}
	}
}